/*	talmud - The TALMUD roguelike
 * Copyright (C) 2012, talmud contributors
 *
 *  This program is free software; you can redistribute it and/or modify it
 *  under the terms of Version 2 of the GNU General Public License as published
 *  by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See Version 2 of the GNU General Public
 *  License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

#ifndef race_h
#define race_h

#include <stdint.h>

#define MAXATK			2

#define R_HUMAN			0
#define R_ELF			1
#define R_ORC			2
#define R_HOBBIT		3
#define R_GNOME			4
#define R_PEBBLE_GOLEM		5
#define R_STONE_GOLEM		6
#define R_ROCK_GOLEM		7
#define R_MOUNTAIN_GOLEM	8
#define R_IMP			9
#define R_GOBLIN		10
#define R_MINOTAUR		11
#define R_GARGOYLE		12
#define R_CENTAUR		13
#define R_LICH			14
#define R_THEACOLYTE		15
#define R_ALISTAR		16
#define R_SKELETON		17
#define R_DIRE_SKELETON		18
#define R_HOBBIT_SKELETON	19
#define R_VAMPIRE		20
#define R_COUNT			21

#define F_NEVER			0
#define F_ENDANGERED		1
#define F_RARE			2
#define F_UNUSUAL		3
#define F_NORMAL		4
#define F_COMMON		5
#define F_PROLIFIC		6

#define I_NONE			0
#define I_FIRE			1
#define I_COLD			2
#define I_SHOCK			3
#define I_ACID			4
#define I_POISON		5
#define I_META			6
#define I_HOLY			7
#define I_SLEEP			8
#define I_INVIS			9
#define I_INFRAVIS		10
#define I_PARALYSIS		11
#define I_CONFUSION		12
#define I_INTRINSCOUNT		13

#define ATK_NONE		0
#define A_HIT			1
#define A_KICK			2
#define A_BITE			3
#define A_GAZE			4
#define A_SPELL			5

#define S_NONE			0
#define S_COLD_TOUCH		1
#define S_FIRE_TOUCH		2
#define S_SHOCK_TOUCH		3
#define S_CURSE			4

#define IM(x)			((x == I_NONE) ? 0 : (1 << x))

typedef struct racedef_s
{
	const char *name;
	const char *term;
	char rep;
	uint8_t attr;
	uint8_t freq;
	uint8_t grp;
	uint8_t diff;		// difficulty
	uint8_t mr;
	uint8_t ac;
	uint16_t maxhp;
	uint32_t resist;
	uint8_t atkcount;
	uint8_t atktype[MAXATK];
	int8_t tohit[MAXATK];
	uint8_t hdcount[MAXATK];
	uint8_t hd[MAXATK];
	uint8_t speed;
} racedef_t;

extern const racedef_t RACEDEFS[R_COUNT];
extern const char * const INTRINSNAME[I_INTRINSCOUNT];

#endif
